Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staging: add [workspace.lints] to manifest #547

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

epilys
Copy link
Member

@epilys epilys commented Nov 19, 2023

Summary of the PR

This PR enables all crates of the staging workspace to share lints. With 1.74 it is now possible to define them in Cargo.toml.

Note: In older versions you'll simply get a "warning: unused manifest key" when using cargo.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@stefano-garzarella
Copy link
Member

Yeah, LGTM, just a couple of questions:

  • should we also remove the lints in staging/vhost-device-sound/src/lib.rs ?
  • what about enable them also for other crates in staging, but also in the main workspace? (not for this PR, but we should open Issues and do it incrementally)

@epilys
Copy link
Member Author

epilys commented Nov 20, 2023

Yeah, LGTM, just a couple of questions:

* should we also remove the lints in `staging/vhost-device-sound/src/lib.rs` ?

We need to update the CI rust to 1.74 first, otherwise the lints won't be picked up from the workspace.

* what about enable them also for other crates in staging, but also in the main workspace? (not for this PR, but we should open Issues and do it incrementally)

Yeah, there might be a lot of errors. Incrementally sounds good!

From Rust 1.74 and onwards, this section enables opt-in lints for crates
of this workspace. Read more information at https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html

For a crate to opt-in, it needs to set

 [lints]
 workspace = true

In its Cargo.toml

Closes rust-vmm#518

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
No functional changes.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants